Optical sensors have the functions of detecting objects to be sensed and detecting, for example, distances from objects to be sensed, and expand in application.
Electronic devices such as mobile phones (including smartphones) and digital cameras include liquid crystal panels for displaying images. Further, some of these electronic devices are types of electronic devices including touch panels to allow touch operations on liquid crystal panels. In such an electronic device including a liquid crystal panel and a touch panel, it is necessary to activate the touch panel in performing a normal touch operation, whereas it is not necessary to activate the touch panel when a face comes close.
Therefore, there is a growing demand for the mounting of the electronic device described above with a proximity sensor that, in order to reduce power consumption and prevent a malfunction of the touch panel, allows the touch panel to be deactivated when a face comes close to the liquid crystal panel. In response to such a demand, a mobile phone is for example configured such that an audio output section of the mobile phone that is put to an ear is mounted with a proximity sensor that senses the approach of a human's face to the mobile phone so that the touch panel is deactivated for the duration of a call.
Further, since an output value of the proximity sensor is inversely proportional to a distance of approach, there is a demand for the use of the proximity sensor as a range sensor.
For example, Patent Literature 1 describes using, as an optical sensor that senses the position of an object, a plurality of light-receiving elements to receive light from a light source, detect the orientation of the light source with respect to the light-receiving elements and the distance from the light-receiving elements to the light source, and thereby senses the position of the light source.
Furthermore, there is a demand for the disposition of a plurality of photodiodes in a light-receiving section of an optical sensor to sense a movement of an object from amounts of change in output values of the photodiodes.
For example, Patent Literature 2 discloses a reflective optical sensor as an optical sensor that senses a movement of an object. This optical sensor, as shown in FIG. 8, includes a light-emitting element 301 and two light-receiving elements 302 and 303, with the light-receiving elements 302 and 303 disposed on both sides of the light-emitting element 301 respectively. In a case where an object to be sensed 304 is on the right side, light reflected from the object to be sensed 304 strongly strikes the light-receiving element 303. On the other hand, in a case where the object to be sensed 304 is on the left side, light reflected from the object to be sensed 304 strongly strikes the light-receiving element 302. Moreover, the position and/or movement of the object to be sensed 304 can be detected by reading a difference between a photocurrent generated in the light-receiving element 302 and a photocurrent generated in the light-receiving element 303.
As a sensor that senses a movement of an object, there is also a demand for the use of an optical sensor as a gesture sensor that senses a movement of a hand. Such a gesture sensor is used as an added function of a proximity sensor, and senses a movement of a hand over the touch panel in a noncontact manner. This makes it possible to operate, in a scrolling manner, a screen displayed on the liquid crystal panel, without contaminating the surface of the liquid crystal panel even with a wet hand or a dirty hand.